<?php

namespace controllers;

use libs\registry as Registry;

class index_controller extends \libs\controller{

    protected $_tabela = "strony";
    private $_newsid = 1;

    /**
     * @route=(/)
     */
    public function index() {

        $db = Registry::get('database');

        $news = $db->select('*')
                    ->from('strony')
                    ->join('strony_seo','strony_seo.id_strony=strony.id')
                    ->where(array('strony.id' => $this->_newsid))
                    ->execute();
        
        return array('news' => $news[0]);
    }


}

?>
